#include<stdio.h>
#include<unistd.h>



int main(int argc ,char *argv[] ,char *env[])
{
    pid_t id = fork();
    if(id == 0)
    {
        while(1)
        {
            printf("child:%d\n",getpid());
            sleep(1);
        }
    }
    else 
    {
        int count = 5;
        while(count--)
        {
            printf("parent:%d\n",getppid());
            sleep(1);
        }
    }
    return 0;
}
